// router/index.js
import { createRouter, createWebHistory } from 'vue-router';

// 导入组件
import HelloWorld from '../src/components/HelloWorld.vue';
// 导入组件vue-vue3的区别
import QuBie from '../src/components/vueQuebie.vue';
// 父组件操作子组件
import Parent from '../src/components/parent.vue';
// ref与reactive
import refReactive from '../src/components/refReactive.vue';
//to系列
import toRef from '../src/components/toRef.vue';
//watch侦听器
import watch from '../src/components/watch.vue';
//动态组件
import dontaiComponents from '../src/components/dontaiComponents.vue';
//Vue 组件的内容都会被挂载在组件的根 DOM 节点下，希望将组件的内容渲染到组件之外的DOM节点中，可用 teleport。
import teleport from '../src/components/teleport.vue';
//keep-alive 组件来缓存当前显示的组件，保持其状态不被销毁
import keepAlive from '../src/components/keepAlive.vue';
//transition 动画
import transition from '../src/components/transition.vue';
//EventBus
import EventBus from '../src/components/EventBus/EventBus.vue';
const routes = [
  { path: '/', component: HelloWorld },
  { path: '/QuBie', component: QuBie },
  { path: '/Parent', component: Parent },
  { path: '/refReactive', component: refReactive },
  { path: '/toRef', component: toRef },
  { path: '/watch', component: watch },
  { path: '/dontaiComponents', component: dontaiComponents },
  { path: '/teleport', component: teleport },
  { path: '/keepAlive', component: keepAlive },
  { path: '/transition', component: transition },
  { path: '/EventBus', component: EventBus },
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;
